<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Segment comments</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Segment comments<div class="ingroups"><a class="el" href="group__seg.html">Segments</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Segment comments are rarely used yet. </p>
<p>The user may define a segment comment by pressing ':' while standing on the segment name at the segment start.</p>
<p>The main advantage of segment comments compared to anterior lines (see <a class="el" href="lines_8hpp.html" title="High level functions that deal with the generation of the disassembled text lines. ">lines.hpp</a>) is that they are attached to a segment, not to an address and they will move with the start of segment if the segment boundaries change.</p>
<p>You may set segment comments in your LDR module to describe characteristics of a segment in comments.</p>
<p>Repeatable segment comments are not used at all, because I don't know where they should be repeated. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa055ce0d55f0949d6f907a584e1ec65d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__seg__cmt.html#gaa055ce0d55f0949d6f907a584e1ec65d">get_segment_cmt</a> (<a class="el" href="pro_8h.html#a386c10c6aa4340f1d63df85f40454fce">qstring</a> *buf, const <a class="el" href="classsegment__t.html">segment_t</a> *s, bool repeatable)</td></tr>
<tr class="memdesc:gaa055ce0d55f0949d6f907a584e1ec65d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get segment comment.  <a href="#gaa055ce0d55f0949d6f907a584e1ec65d">More...</a><br /></td></tr>
<tr class="separator:gaa055ce0d55f0949d6f907a584e1ec65d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga092e05e64ba60bc29bb90cfdd03f05f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__seg__cmt.html#ga092e05e64ba60bc29bb90cfdd03f05f8">set_segment_cmt</a> (const <a class="el" href="classsegment__t.html">segment_t</a> *s, const char *cmt, bool repeatable)</td></tr>
<tr class="memdesc:ga092e05e64ba60bc29bb90cfdd03f05f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set segment comment.  <a href="#ga092e05e64ba60bc29bb90cfdd03f05f8">More...</a><br /></td></tr>
<tr class="separator:ga092e05e64ba60bc29bb90cfdd03f05f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7510d346be798cbe9bb08305ee964e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__seg__cmt.html#gaa7510d346be798cbe9bb08305ee964e5">std_out_segm_footer</a> (struct <a class="el" href="structoutctx__t.html">outctx_t</a> &amp;ctx, <a class="el" href="classsegment__t.html">segment_t</a> *seg)</td></tr>
<tr class="memdesc:gaa7510d346be798cbe9bb08305ee964e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate segment footer line as a comment line.  <a href="#gaa7510d346be798cbe9bb08305ee964e5">More...</a><br /></td></tr>
<tr class="separator:gaa7510d346be798cbe9bb08305ee964e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa055ce0d55f0949d6f907a584e1ec65d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#ab65ed42d67e6c517c746ff2a6a187016">ssize_t</a> <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> get_segment_cmt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pro_8h.html#a386c10c6aa4340f1d63df85f40454fce">qstring</a> *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classsegment__t.html">segment_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>repeatable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get segment comment. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>buffer for the comment </td></tr>
    <tr><td class="paramname">s</td><td>pointer to segment structure </td></tr>
    <tr><td class="paramname">repeatable</td><td>0: get regular comment. 1: get repeatable comment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>size of comment or -1 </dd></dl>

</div>
</div>
<a class="anchor" id="ga092e05e64ba60bc29bb90cfdd03f05f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> set_segment_cmt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsegment__t.html">segment_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>repeatable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set segment comment. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>pointer to segment structure </td></tr>
    <tr><td class="paramname">cmt</td><td>comment string, may be multiline (with '<br />
'). maximal size is 4096 bytes. Use empty str ("") to delete comment </td></tr>
    <tr><td class="paramname">repeatable</td><td>0: set regular comment. 1: set repeatable comment. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa7510d346be798cbe9bb08305ee964e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> std_out_segm_footer </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structoutctx__t.html">outctx_t</a> &amp;&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsegment__t.html">segment_t</a> *&#160;</td>
          <td class="paramname"><em>seg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate segment footer line as a comment line. </p>
<p>This function may be used in IDP modules to generate segment footer if the target assembler doesn't have 'ends' directive. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
